<#macro permission parentCode>
    <@sysPermissionList code=parentCode>
       	<ul class="pagemenu">
			<#list permissions as p>
		        <#if p?size gt 0>
	        		<#if p.hasChildren>
				        <li class="submenu">
				        	<a href="#" data-ref="${p.url!}" id="${p.code!}"><i class="icon ${p.icon!}"></i> <span>${p.name}</span></a>
							<@permission parentCode=p.code/>
				        </li>
	        		<#else>
				        <li>
				        	<a href="#" data-ref="${p.url!}" id="${p.code!}"><i class="icon ${p.icon!}"></i> <span>${p.name}</span></a>
							<@permission parentCode=p.code/>
				        </li>
	        		</#if>
		        </#if>
		    </#list>
	    </ul>
	</@sysPermissionList>
</#macro>
<div id="sidebar">
	<a href="#" class="visible-phone"><i class="icon icon-home" style="margin-top: -2px;"></i>菜单</a>
	<@permission parentCode='root' />
</div>